/**
 *  * Created by wz on 2017/9/26
 *  * <p/>
 *  * Copyright (c) 2015-2015
 *  * Apache License
 *  * Version 2.0, January 2004
 *  * http://www.apache.org/licenses/
 *  
 */
package com.huirui.controller;

import com.huirui.entity.Identity;
import com.huirui.service.IdentityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IdentityController {

    @Autowired
    IdentityService identityService;

    @RequestMapping(value = "identity/insert/{identityName}")
    public String insertIdentity(@PathVariable("identityName") String identityName){

        Identity identity = new Identity(identityName);
        identityService.insertIdentity(identity);
        return "identity insert success";
    }

}
